Cleaned up the typedef for Babl, fixes issues with g++.
authorØyvind Kolås <ok@src.gnome.org>
Mon, 9 Oct 2006 13:40:41 +0000 (13:40 +0000)
committerØyvind Kolås <ok@src.gnome.org>
Mon, 9 Oct 2006 13:40:41 +0000 (13:40 +0000)
ChangeLog
babl/babl-classes.h
babl/babl-conversion.c
babl/babl-fish-path.c
babl/babl-fish-reference.c
babl/babl-fish-simple.c

index 0727357984b4a34564840c8f2f045f06ab459df1..6c243811d37afe0a6d3a21c4f047bdb49fc1d616 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-10-09  Øyvind Kolås  <pippin@gimp.org>
+
+       Cleaned up the typedef for Babl, fixes issues with g++.
+
+       * babl/babl-classes.h:
+       * babl/babl-conversion.c: (conversion_new):
+       * babl/babl-fish-path.c: (babl_fish_path):
+       * babl/babl-fish-reference.c: (babl_fish_reference):
+       * babl/babl-fish-simple.c: (babl_fish_simple):
+
 2006-09-26  Dominik Ernst  <dernst@gmx.de>
 
        * babl/babl-classes.h: fixed an issue with g++
index e70f460d8f67ac3f468096618691fa3c9fd6f632..05106f32391cb5908cdd11b0b80a8177213d0b61 100644 (file)
@@ -76,6 +76,7 @@ typedef enum {
 } BablClassType;
 
 
+typedef union _Babl Babl;
 
 /* common header for any item inserted into database */
 typedef struct
@@ -91,8 +92,8 @@ typedef struct
 typedef struct
 BablConversion {
   BablInstance           instance;
-  union Babl            *source;
-  union Babl            *destination;
+  Babl                  *source;
+  Babl                  *destination;
   long                   cost;
   double                 error;
   union
@@ -194,8 +195,8 @@ typedef struct
 typedef struct
 {
   BablInstance    instance;
-  union Babl     *source;
-  union Babl     *destination;
+  Babl           *source;
+  Babl           *destination;
 
   double          error;    /* the amount of noise introduced by the fish */
 
@@ -267,7 +268,7 @@ typedef struct
   void         (*destroy) (void);
 } BablExtension;
 
-typedef union Babl
+union _Babl
 {
   BablClassType     class_type;
   BablInstance      instance;
@@ -283,7 +284,7 @@ typedef union Babl
   BablFishSimple    fish_simple;
   BablFishPath      fish_path;
   BablExtension     extension;
-} Babl;
+} _Babl;
 
 #endif
 
index 88ebafd36934960ead1795333d6806ef0a920613..e5dd826b53dffc8133989712c0489a663eec2701 100644 (file)
@@ -98,8 +98,8 @@ conversion_new (const char        *name,
     }
 
   babl->instance.id            = id;
-  babl->conversion.source      = (union Babl*)source;
-  babl->conversion.destination = (union Babl*)destination;
+  babl->conversion.source      = source;
+  babl->conversion.destination = destination;
   babl->conversion.error       = -1.0;
   babl->conversion.cost        = 69L;
 
index d3e4428cb2963eb0bc7fe75d6ff97106a574d96c..3b407cab80145ed523dee8d4dde2eb7dd2f30103 100644 (file)
@@ -287,8 +287,8 @@ babl_fish_path (Babl   *source,
   babl->instance.id      = 0;
   babl->instance.name    = ((void *)babl) + sizeof(BablFishPath);
   strcpy (babl->instance.name, name);
-  babl->fish.source      = (union Babl*)source;
-  babl->fish.destination = (union Babl*)destination;
+  babl->fish.source      = source;
+  babl->fish.destination = destination;
 
   babl->fish.processings = 0;
   babl->fish.pixels      = 0;
index 8acaab1e547a2d4fbf2f18e025abf0e7eea9a58d..a93dd8563809eb90b80a1f80bf56cfd3c01add70 100644 (file)
@@ -64,8 +64,8 @@ babl_fish_reference (Babl   *source,
   babl->instance.id      = 0;
   babl->instance.name    = ((void *)babl) + sizeof(BablFishReference);
   strcpy (babl->instance.name, name);
-  babl->fish.source      = (union Babl*)source;
-  babl->fish.destination = (union Babl*)destination;
+  babl->fish.source      = source;
+  babl->fish.destination = destination;
 
   babl->fish.processings = 0;
   babl->fish.pixels      = 0;
index 6b0fd495afbe5cd41bee68d11b99fd498e2a44ae..deb525fc52bf250827490b7ce8a065b87d2d1ea5 100644 (file)
@@ -41,8 +41,8 @@ babl_fish_simple (BablConversion *conversion)
   babl->instance.id      = 0;
   babl->instance.name    = ((void *)babl) + sizeof(BablFishSimple);
   strcpy (babl->instance.name, name);
-  babl->fish.source      = (union Babl*)conversion->source;
-  babl->fish.destination = (union Babl*)conversion->destination;
+  babl->fish.source      = conversion->source;
+  babl->fish.destination = conversion->destination;
 
   babl->fish.processings = 0;
   babl->fish.pixels      = 0;